package gao.xiaolei.entity;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;

@Entity
public class GroupMember {

	@EmbeddedId
	private GroupMemberId id;

	@Column
	private Integer isLeader;

	public GroupMember(String groupId, String userId, Integer isLeader) {
		super();
		this.id = new GroupMemberId(groupId, userId);
		this.isLeader = isLeader;
	}

	public GroupMember() {
		super();
	}

	public GroupMemberId getId() {
		return id;
	}

	public void setId(String groupId,String userId) {
		this.id.setGroupId(groupId);
		this.id.setUserId(userId);
	}

	public int getIsLeader() {
		return isLeader;
	}

	public void setIsLeader(int isLeader) {
		this.isLeader = isLeader;
	}

}
